
// Copyright (c) 2002 HTHK
package admin.system.rolefunc;

import com.ffpc.sql.*;

import admin.system.rolefunc.RoleFuncBean;
/**
 * A Class class.
 * <P>
 * @author HTHK
 */
public class RoleFunc
  extends DataObject
  implements RoleFuncBean
{
    private String role_id = null;
    private String func_id = null;
    private String remark = null;
    private String crt_user = null;
    private String crt_date = null;
    private String upd_user = null;
    private String upd_date = null;
    private Column ColRole_id = null;
    private Column ColFunc_id = null;
    private Column ColRemark = null;
    private Column ColCrt_user = null;
    private Column ColCrt_date = null;
    private Column ColUpd_user = null;
    private Column ColUpd_date = null;
    /**
     * Constructor
     */
    public RoleFunc()
    {
        ColRole_id = new Column(0,"role_id",Column.Types.string,null,10,false);
        ColFunc_id = new Column(1,"func_id",Column.Types.string,null,10,false);
        ColRemark = new Column(2,"remark",Column.Types.string,null,100,true);
        ColCrt_user = new Column(3,"crt_user",Column.Types.string,null,10,false);
        ColCrt_date = new Column(4,"crt_date",Column.Types.time,null,10,true);
        ColUpd_user = new Column(5,"upd_user",Column.Types.string,null,10,false);
        ColUpd_date = new Column(6,"upd_date",Column.Types.time,null,10,true);
    }

    // functions belongs to RoleFuncBean interface

    @Override
	public void setRole_id(String role_id)
    {
        this.role_id = this.setAttribute(ColRole_id,role_id);
    }

    @Override
	public String getRole_id()
    {
        return this.role_id==null?"":this.role_id;
    }

    @Override
	public void setFunc_id(String func_id)
    {
        this.func_id = this.setAttribute(ColFunc_id,func_id);
    }

    @Override
	public String getFunc_id()
    {
        return this.func_id==null?"":this.func_id;
    }

    @Override
	public void setRemark(String remark)
    {
        this.remark = this.setAttribute(ColRemark,remark);
    }

    @Override
	public String getRemark()
    {
        return this.remark==null?"":this.remark;
    }

    @Override
	public void setCrt_user(String crt_user)
    {
        this.crt_user = this.setAttribute(ColCrt_user,crt_user);
    }

    @Override
	public String getCrt_user()
    {
        return this.crt_user==null?"":this.crt_user;
    }

    @Override
	public void setCrt_date(String crt_date)
    {
        this.crt_date = this.setAttribute(ColCrt_date,crt_date);
    }

    @Override
	public String getCrt_date()
    {
        return this.crt_date==null?"":this.crt_date;
    }

    @Override
	public void setUpd_user(String upd_user)
    {
        this.upd_user = this.setAttribute(ColUpd_user,upd_user);
    }

    @Override
	public String getUpd_user()
    {
        return this.upd_user==null?"":this.upd_user;
    }

    @Override
	public void setUpd_date(String upd_date)
    {
        this.upd_date = this.setAttribute(ColUpd_date,upd_date);
    }

    @Override
	public String getUpd_date()
    {
        return this.upd_date==null?"":this.upd_date;
    }
    // belongs to row interface
    @Override
	public Column[] createColumns()
    {
        Column[] cols = new Column[7];
        cols[0] = ColRole_id.clone(null);
        cols[1] = ColFunc_id.clone(null);
        cols[2] = ColRemark.clone(null);
        cols[3] = ColCrt_user.clone(null);
        cols[4] = ColCrt_date.clone(null);
        cols[5] = ColUpd_user.clone(null);
        cols[6] = ColUpd_date.clone(null);
        return cols;
    }

    // super's abstract methods

    @Override
	public String getTableName()
    {
        return "jis.jis_s_role_func";
    }

    @Override
	protected String[] getKeyColumnNames()
    {
        String[] list = {"role_id","func_id"};
        return list;
    }

    @Override
	protected String[] getUpdatableColumnNames()
    {
        String[] list = {"remark","crt_user","crt_date","upd_user","upd_date"};
        return list;
    }

    @Override
	protected void retrieveColumnValues()
    {
        this.role_id = this.retrieveColumnValue("role_id");
        this.func_id = this.retrieveColumnValue("func_id");
        this.remark = this.retrieveColumnValue("remark");
        this.crt_user = this.retrieveColumnValue("crt_user");
        this.crt_date = this.retrieveColumnValue("crt_date");
        this.upd_user = this.retrieveColumnValue("upd_user");
        this.upd_date = this.retrieveColumnValue("upd_date");
    }
}

